FROM java:8

EXPOSE 8081

ARG JAR_FILE

ADD target/${JAR_FILE} /collector-parent.jar

RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

ENTRYPOINT [ "sh", "-c", "exec java  -jar /collector-parent.jar" ]